const routes = [
  {
    path: '/',
    meta: {
      keepAlive: true,
    },
    redirect: '/h1',
    component: () => import('../../src/components/layout.vue'),
    children: [
      {
        path: 'h1',
        component: () => import('../../src/components/h1.vue'),
        meta: {
          keepAlive: true,
        },
      },
      {
        path: 'h2',
        component: () => import('../../src/components/h2.vue'),
        meta: {
          keepAlive: true,
        },
      },
      {
        path: 'h3',
        meta: {
          keepAlive: false,
        },
        component: () => import('../../src/components/h3.vue'),
      },

    ],
  },

  {
    path: '/h4',
    meta: {
      keepAlive: true,
    },
    component: () => import('../../src/components/h4.vue'),
  },


  {
    path: '/h5',
    redirect: '/h5/index',
    meta: {
      standAlone: true,// 防止多布局且不缓存的路由页面出现重复挂载两次
    },
    component: () => import('../../src/components/layout2.vue'),
    children: [
      {
        path: 'index',
        component: () => import('../../src/components/h5.vue'),
      }
    ],
  },

];

export default routes;
